\begin{tikzpicture}[>=Stealth,
    boxed/.style={draw, rectangle, inner sep=0.5em, minimum width=2.2em},
]
    \pgfmathsetmacro{\h}{1.2}
    \begin{scope}
        \node at (0.5, 2) {例 1};
        \draw (-0.3, \h) node {$x$} (0.5, \h) node[boxed] {$-7$} (1.5, \h) node {$=5$};
        \draw [->] (0.5, 0.9) -- (0.5, 0.6)  -| (1.5, 0.3);
        \draw (0, 0) node {$x = 5$} (1.5, 0) node[boxed] {$+7$};
    \end{scope}

    \begin{scope}[xshift=4cm]
        \node at (1.5, 2) {例 2};
        \draw (0, \h) node {$7x$} (1.5, \h) node{$=$} (2.6, \h) node[boxed, minimum width=3em] {$6x$} (3.6, \h) node {$-4$};
        \draw [->] (2.5, 0.9) -- (2.5, 0.6)  -| (1.2, 0.3);
        \draw (0, 0) node {$7x$} (1.0, 0) node[boxed] {$-6x$} (2.2, 0) node {$=$} (3.6, 0) node {$-4$};
    \end{scope}
\end{tikzpicture}
